-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[DirectX] Use "texture" not "SRV" when pretty printing resources #130230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We're printing "SRV" here when DXC would print "texture". Fix this to be consistent. Fixes llvm#130227.
@llvm/pr-subscribers-backend-directx Author: Justin Bogner (bogner) ChangesWe're printing "SRV" here when DXC would print "texture". Fix this to be consistent. Fixes #130227. Full diff: https://github.com/llvm/llvm-project/pull/130230.diff 3 Files Affected:
diff --git a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
index 7255a9be06d51..83ec574bb5870 100644
--- a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
+++ b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
@@ -23,7 +23,7 @@ using namespace llvm;
static StringRef getRCName(dxil::ResourceClass RC) {
switch (RC) {
case dxil::ResourceClass::SRV:
- return "SRV";
+ return "texture";
case dxil::ResourceClass::UAV:
return "UAV";
case dxil::ResourceClass::CBuffer:
diff --git a/llvm/test/CodeGen/DirectX/CreateHandle.ll b/llvm/test/CodeGen/DirectX/CreateHandle.ll
index c4e02fb02733d..048e57c091142 100644
--- a/llvm/test/CodeGen/DirectX/CreateHandle.ll
+++ b/llvm/test/CodeGen/DirectX/CreateHandle.ll
@@ -3,10 +3,10 @@
; CHECK-PRETTY: Type Format Dim ID HLSL Bind Count
; CHECK-PRETTY: ---------- ------- ----------- ------- -------------- ---------
-; CHECK-PRETTY: SRV f32 buf T0 t7 unbounded
-; CHECK-PRETTY: SRV byte r/o T1 t8,space1 1
-; CHECK-PRETTY: SRV struct r/o T2 t2,space4 1
-; CHECK-PRETTY: SRV u32 buf T3 t3,space5 24
+; CHECK-PRETTY: texture f32 buf T0 t7 unbounded
+; CHECK-PRETTY: texture byte r/o T1 t8,space1 1
+; CHECK-PRETTY: texture struct r/o T2 t2,space4 1
+; CHECK-PRETTY: texture u32 buf T3 t3,space5 24
; CHECK-PRETTY: UAV i32 buf U0 u7,space2 1
; CHECK-PRETTY: UAV f32 buf U1 u5,space3 1
diff --git a/llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll b/llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll
index 9919a3f2dbd25..089b6eaa563ca 100644
--- a/llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll
+++ b/llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll
@@ -3,10 +3,10 @@
; CHECK-PRETTY: Type Format Dim ID HLSL Bind Count
; CHECK-PRETTY: ---------- ------- ----------- ------- -------------- ---------
-; CHECK-PRETTY: SRV f32 buf T0 t7 unbounded
-; CHECK-PRETTY: SRV byte r/o T1 t8,space1 1
-; CHECK-PRETTY: SRV struct r/o T2 t2,space4 1
-; CHECK-PRETTY: SRV u32 buf T3 t3,space5 24
+; CHECK-PRETTY: texture f32 buf T0 t7 unbounded
+; CHECK-PRETTY: texture byte r/o T1 t8,space1 1
+; CHECK-PRETTY: texture struct r/o T2 t2,space4 1
+; CHECK-PRETTY: texture u32 buf T3 t3,space5 24
; CHECK-PRETTY: UAV i32 buf U0 u7,space2 1
; CHECK-PRETTY: UAV f32 buf U1 u5,space3 1
; CHECK-PRETTY: cbuffer NA NA CB0 cb0 1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…m#130230) We're printing "SRV" here when DXC would print "texture". Fix this to be consistent. Fixes llvm#130227.
We're printing "SRV" here when DXC would print "texture". Fix this to be consistent.
Fixes #130227.